<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>X+约课系统 - 主页</title>
    <meta name="keywords" content="后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description"
          content="完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->

    <link rel="shortcut icon" href="../static/favicon.ico" th:href="@{/static/ico/favicon.ico}">
    <link href="../static/css/bootstrap.min.css?v=3.3.6" th:href="@{/static/css/bootstrap.min.css(v='3.3.6')}"
          rel="stylesheet">
    <link href="../static/css/font-awesome.min.css?v=4.4.0" th:href="@{/static/css/font-awesome.min.css(v='4.4.0')}"
          rel="stylesheet">
    <link href="../static/css/animate.css" th:href="@{/static/css/animate.css}" rel="stylesheet">
    <link href="../static/css/style.css?v=5.0" th:href="@{/static/css/style.css(v='5.0')}" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="../../static/css/plugins/sweetalert/sweetalert.css" th:href="@{/static/css/plugins/sweetalert/sweetalert.css}" rel="stylesheet">
    <!-- Sweet alert -->
    <script src="../../static/js/plugins/sweetalert/sweetalert.min.js" th:src="@{/static/js/plugins/sweetalert/sweetalert.min.js}"></script>

    <script src="../static/js/jquery.min.js?v=2.1.4" th:src="@{/static/js/jquery.min.js(v='2.1.4')}"></script>
    <script src="../static/js/bootstrap.min.js?v=3.3.6" th:src="@{/static/js/bootstrap.min.js(v='3.3.6')}"></script>

</head>

<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">

<input type="hidden" id="loginUserJson" th:value="${session.LOGIN_USER}">


<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i>
        </div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element">
                            <span>
                            <img alt="image" width="80px" height="80px" name="avatarUrl" class="img-circle"
                                 src="../static/img/profile_small.jpg"
                                 th:src="@{/user/public/{avatar}(avatar=${session.LOGIN_USER.avatarUrl})}"/>
                            </span>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                               <span class="block m-t-xs"><strong class="font-bold"
                                                                  th:text="${session.LOGIN_USER.name}">admin</strong></span>
                                <span class="text-muted text-xs block" th:text="${session.LOGIN_USER.roleName}">超级管理员<b
                                        class="caret"></b></span>
                                </span>
                        </a>
                        <ul class="dropdown-menu animated fadeInRight m-t-xs">
                            <li><a class="J_menuItem" href="x_modify_password.html"
                                   th:href="@{/user/x_modify_password.do}" target="_self">修改密码</a>
                            </li>
                            <li><a class="J_menuItem" href="x_profile.html"
                                   th:href="@{/user/x_profile.do?id={id}(id=${session.LOGIN_USER.id})}">个人资料</a>
                            </li>
                            <li class="divider"></li>
                            <li><a href="javascript:void(0);" onclick="logoutConfirm()">安全退出</a></li>
                        </ul>
                    </div>
                    <div class="logo-element">X+
                    </div>
                </li>
                <li>
                    <a class="J_menuItem" href="x_index_home.html">
                        <i class="fa fa-home"></i>
                        <span class="nav-label">首页</span>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <i class="fa fa-users"></i>
                        <span class="nav-label">会员管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>

                            <a class="J_menuItem" href="member/x_member_list.html"
                               th:href="@{/member/x_member_list.do}"><i class="fa fa-circle-o"></i>会员</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="member/x_member_card.html"
                               th:href="@{/card/x_member_card.do}"><i class="fa fa-circle-o"></i>会员卡</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="member/x_member_card_bind.html"
                               th:href="@{/cardBind/x_member_card_bind.do}"><i class="fa fa-circle-o"></i>会员绑定</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a href="#">
                        <i class="fa fa-object-group"></i>
                        <span class="nav-label">团课管理</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="course/x_course_list.html"
                               th:href="@{/course/x_course_list.do}"><i class="fa fa-circle-o"></i>团课课程</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="course/x_course_schedule.html"
                               th:href="@{/schedule/x_course_schedule.do}"><i class="fa fa-circle-o"></i>团课课程表</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="course/x_course_reservation.html"
                               th:href="@{/globalSet/x_course_reservation.do}"><i class="fa fa-circle-o"></i>团课预约设置</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a class="J_menuItem" href="user/x_teacher_list.html" th:href="@{/user/x_teacher_list.do}">
                        <i class="fa fa-user"></i>
                        <span class="nav-label">老师管理</span>
                    </a>
                </li>
                <!-- add by yejf-->
                <li>
                    <a href="#">
                        <i class="fa fa-bar-chart-o"></i>
                        <span class="nav-label">数据统计</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a class="J_menuItem" href="statistics/x_card_list_stat.html"
                               th:href="@{/statistics/x_card_list_stat.html}"><i
                                    class="fa fa-circle-o"></i>会员卡统计</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="statistics/x_card_cost_stat.html"
                               th:href="@{/statistics/x_card_cost_stat.html}"><i class="fa fa-circle-o"></i>收费统计</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="statistics/x_class_cost_stat.html"
                               th:href="@{/statistics/x_class_cost_stat.html}"><i
                                    class="fa fa-circle-o"></i>课消统计</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="statistics/x_class_hour_stat.html"
                               th:href="@{/statistics/x_class_hour_stat.html}"><i class="fa fa-circle-o"></i>总课次统计</a>
                        </li>
                        <li>
                            <a class="J_menuItem" href="statistics/x_member_num_static.html"
                               th:href="@{/statistics/x_member_num_static.html}"><i class="fa fa-circle-o"></i>新增与流失统计</a>
                        </li>
                    </ul>
                </li>

                <!--<li>
                    <a class="J_menuItem" href="x_wechat.html" th:href="@{/wechat/x_wechat.do}">
                        <i class="fa fa-wechat"></i>
                        <span class="nav-label">微信设置</span>
                    </a>
                </li>

                <li>
                    <a class="J_menuItem" href="x_app_store.html" th:href="@{/app/x_app_store.do}">
                        <i class="fa fa-tasks"></i>
                        <span class="nav-label">应用中心(新)</span>
                    </a>
                </li>-->
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <!--<div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i
                        class="fa fa-bars"></i> </a>
                    <form role="search" class="navbar-form-custom" method="post" action="#">
                        <div class="form-group">
                            <input type="text" placeholder="请输入您需要查找的内容 …" class="form-control"
                                   name="top-search" id="top-search">
                        </div>
                    </form>
                </div>
                <ul class="nav navbar-top-links navbar-right">
                    &lt;!&ndash; 把信息收发取功能去掉了： by yejf &ndash;&gt;
                    &lt;!&ndash; 添加试用版说明 &ndash;&gt;
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <span class="label label-info"
                                  style="padding: 8px 15px;font-size: 0.9em;">付费版 | 还剩322天</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li>
                                <a class="J_menuItem" href="x_payment.html">
                                    <div class="text-info">
                                        <i class="fa fa-hand-o-right"></i> 马上去充值
                                    </div>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
                            <i class="fa fa-bell"></i> <span class="label label-primary">8</span>
                        </a>
                        <ul class="dropdown-menu dropdown-alerts">
                            <li>
                                <a href="mailbox.html">
                                    <div>
                                        <i class="fa fa-envelope fa-fw"></i> 您有16条未读消息
                                        <span class="pull-right text-muted small">4分钟前</span>
                                    </div>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="x_profile.html">
                                    <div>
                                        <i class="fa fa-qq fa-fw"></i> 3条新回复
                                        <span class="pull-right text-muted small">12分钟钱</span>
                                    </div>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <div class="text-center link-block">
                                    <a class="J_menuItem" href="x_notifications.html">
                                        <strong>查看所有 </strong>
                                        <i class="fa fa-angle-right"></i>
                                    </a>
                                </div>
                            </li>
                        </ul>
                    </li>

                    <li class="dropdown hidden-xs">
                        <a class="right-sidebar-toggle" aria-expanded="false">
                            <i class="fa fa-tasks"></i> 主题
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
-->
        <div class="row content-tabs">
            <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:void(0);" class="active J_menuTab" data-id="x_index_home.html">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
            </button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>

                </button>
                <ul role="menu" class="dropdown-menu dropdown-menu-right">
                    <li class="J_tabShowActive"><a>定位当前选项卡</a>
                    </li>
                    <li class="divider"></li>
                    <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                    </li>
                    <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                    </li>
                </ul>
            </div>
            <!--写一个退出的点击事件-->
            <a href="javascript:void(0);" class="roll-nav roll-right J_tabExit" onclick="logoutConfirm();"><i
                    class="fa fa-sign-out"></i> 退出</a>
            <!--            <a href="x_login.html" class="roll-nav roll-right J_tabExit" th:href="@{/index/logout}"><i-->
            <!--                    class="fa fa fa-sign-out"></i> 退出</a>-->
        </div>

        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" id="iframe0" width="100%" height="100%"
                    src="x_index_home.html?v=4.0" th:src="@{/index/x_index_home.do}" frameborder="0"
                    data-id="x_index_home.html" seamless></iframe>
        </div>

        <div class="footer">
            <!--<div class="pull-right">&copy; 2020-2025 <a href="http://www.teacherye.com" target="_blank">Teacher Ye's Blog</a>-->
            <div class="pull-right">&copy; 2020-2025 <a href="https://www.baidu.com" target="_blank">Teacher Ye's
                Blog</a>
            </div>
        </div>
    </div>

    <!--右侧部分结束-->
    <!--右侧边栏开始-->
    <div id="right-sidebar">
        <div class="sidebar-container">

            <ul class="nav nav-tabs navs-3">

                <li class="active">
                    <a data-toggle="tab" href="#tab-1">
                        <i class="fa fa-gear"></i> 主题
                    </a>
                </li>
                <li class=""><a data-toggle="tab" href="#tab-2">
                    通知
                </a>
                </li>
                <li><a data-toggle="tab" href="#tab-3">
                    项目进度
                </a>
                </li>
            </ul>

            <div class="tab-content">
                <div id="tab-1" class="tab-pane active">
                    <div class="sidebar-title">
                        <h3><i class="fa fa-comments-o"></i> 主题设置</h3>
                        <small><i class="fa fa-tim"></i> 你可以从这里选择和预览主题的布局和样式，这些设置会被保存在本地，下次打开的时候会直接应用这些设置。</small>
                    </div>
                    <div class="skin-setttings">
                        <div class="title">主题设置</div>
                        <div class="setings-item">
                            <span>收起左侧菜单</span>
                            <div class="switch">
                                <div class="onoffswitch">
                                    <input type="checkbox" name="collapsemenu" class="onoffswitch-checkbox"
                                           id="collapsemenu">
                                    <label class="onoffswitch-label" for="collapsemenu">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="setings-item">
                            <span>固定顶部</span>

                            <div class="switch">
                                <div class="onoffswitch">
                                    <input type="checkbox" name="fixednavbar" class="onoffswitch-checkbox"
                                           id="fixednavbar">
                                    <label class="onoffswitch-label" for="fixednavbar">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="setings-item">
                                <span>
                        固定宽度
                    </span>

                            <div class="switch">
                                <div class="onoffswitch">
                                    <input type="checkbox" name="boxedlayout" class="onoffswitch-checkbox"
                                           id="boxedlayout">
                                    <label class="onoffswitch-label" for="boxedlayout">
                                        <span class="onoffswitch-inner"></span>
                                        <span class="onoffswitch-switch"></span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="title">皮肤选择</div>
                        <div class="setings-item default-skin nb">
                                <span class="skin-name ">
                         <a href="#" class="s-skin-0">
                             默认皮肤
                         </a>
                    </span>
                        </div>
                        <div class="setings-item blue-skin nb">
                                <span class="skin-name ">
                        <a href="#" class="s-skin-1">
                            蓝色主题
                        </a>
                    </span>
                        </div>
                        <div class="setings-item yellow-skin nb">
                                <span class="skin-name ">
                        <a href="#" class="s-skin-3">
                            黄色/紫色主题
                        </a>
                    </span>
                        </div>
                    </div>
                </div>


                <div id="tab-2" class="tab-pane">

                </div>

                <div id="tab-3" class="tab-pane">

                </div>

            </div> <!-- end of tab-content -->
        </div> <!-- end of sidebar-container -->
    </div> <!--右侧边栏结束-->

</div>

<!-- 全局js -->
<script src="../static/js/plugins/metisMenu/jquery.metisMenu.js"
        th:src="@{/static/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
<script src="../static/js/plugins/slimscroll/jquery.slimscroll.min.js"
        th:src="@{/static/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
<script src="../static/js/plugins/layer/layer.min.js" th:src="@{/static/js/plugins/layer/layer.min.js}"></script>

<!-- 自定义js -->
<script src="../static/js/hplus.js?v=4.1.0" th:src="@{/static/js/hplus.js(v='4.1.0')}"></script>
<script type="text/javascript" src="../static/js/contabs.js" th:src="@{/static/js/contabs.js}"></script>

</body>

<script type="text/javascript">
    // $(function () {
    //     $("body").bind("keydown", function (event) {
    //         if (event.keyCode == 116) {
    //             event.preventDefault(); //阻止默认刷新
    //             $("#wrapper").attr("src", window.frames["wrapper"].src);
    //         }
    //     })
    // });

    function logoutConfirm() {
        swal({
            title: "退出确认",
            text: "确认退出登录吗？",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "退出",
            closeOnConfirm: false
        }, function () {
            console.log("用户确认退出");
            swal("退出成功！", "您已经退出登录。", "success");
            setTimeout(function () {
                window.location.href = "/index/logout";
            }, 2000);
        });
    }


    //页面加载时，获取session中的登录用户信息
    $(document).ready(function () {
        var loginUserStr = document.getElementById('loginUserJson').value;

        // 更新后的正则表达式，支持属性值中包含空格
        var regex = /(\w+)\s*=\s*('[^']*'|[^,\s]+)/g;
        var match;
        var loginUserObj = {};

        while ((match = regex.exec(loginUserStr)) !== null) {
            // 如果属性值包含单引号，则去除单引号
            var value = match[2].replace(/^'(.*)'$/, '$1');
            loginUserObj[match[1]] = value;
        }

        console.log(loginUserObj);
        console.log(loginUserObj.name);
        console.log(loginUserObj.id);
        console.log(loginUserObj.avatarUrl);

    });
</script>

</html>
